home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 19
/
Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso
/
Aminet
/
comm
/
cnet
/
cnet_wof.lha
/
InstallWOF
< prev
next >
Wrap
Text File
|
1997-04-17
|
18KB
|
436 lines
/**************************************************************************\
$VER: WOF Install, v6.51 (17-Apr-97) by Dotoran of Frontiers!
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR
a=sourceline(2);parse var a . ", "ver" ("vdate")" .;a=random(,,time("s"))
tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;mg=maygetchar
a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
if left(upper(fp),3)~="RAM" then do;se "Reloading to RAM:..."
call setclip('wofinstall',df);tr "#4copy "df"InstallWOF RAM:}"
tr "#0ram:InstallWOF}";exit;end;else df=getclip('wofinstall')
changewhere "InstallWOF";key=" <KEY>g1";gu 23;port=result;lha="C:LHA"
mview="SYS:UTILITIES/MULTIVIEW";guide="SYS:UTILITIES/AMIGAGUIDE"
/* <gu 2407202;oc=result> is the Old Default System Color */
se "f1c7";gu 2407202;oc=result;setobject "7";putuser 2407202
CHECKARC:
if ~exists(df"wof.lha") then do
se "n1 To correctly install and/or update Wheel of Fortune, this "
se "Install script MUST be located in the SAME path as the included "
se "`wof.lha' archive. Presently, I could NOT find `"df"wof.lha' on "
se "your system. Please remedy this situation, then try running this "
se "script again!"key;exit;end
CHECKLHA:
if ~exists(lha) then do
se "n1 This installation procedure makes use of your LHA program, "
tr "however I could not locate it at `"lha"'...n1"
se "Please enter full PATH/FILENAME to your `LHA' program below:"
se "n1>L1305640#"lha"}I16388 40}";gu 70;lha=result;signal CHECKLHA
end
CHECKGUIDE:
if ~exists(mview) & ~exists(guide) then do
se "n1 This installation procedure makes use of either the MultiView "
se "or the AmigaGuide file for automatic guide viewing at the end of the "
se "script, however I could NOT locate either of these programs in your "
tr "`SYS:UTILITIES/' directory...n1"
se "Please enter full PATH/FILENAME to one of these files below:"
se "n1>L1305640#"mview"}I16388 40}";gu 70;a=result
if find(upper(a),"MULTI")>0 then mview=a
if find(upper(a),"AMIGA")>0 then guide=a;signal CHECKGUIDE
end
view=exists(mview)*1;if view=0 then view=exists(guide)*2
tr 'f1@4n1The Wheel of Fortune, v6.51 Install/Update Script:n1'
se ' Hello and welcome to Wheel of Fortune! This script allows you to '
se 'do one of the following. Please choose the option which best suits '
tr 'your present needs:n1'
tr '1. Update WOF, v6.46 (or v6.46a) to v6.50...n1'
tr '2. Install WOF, v6.50 for the first time.....n1'
se 'Use which option? [ABORT]: ';gc;a=result
if a<1 | a>2 | datatype(a,'n')=0 then do;tr 'ABORT';signal QUIT;end
if a=1 then do;tr 'Update';signal UPDATE;end
if a=2 then do;tr 'Install';signal INSTALL;end
UPDATE:
se "n1 You have just selected to update The Wheel of Fortune, v6.46(a) "
se "to the new Wheel of Fortune, v6.50. Is this correct? [Yes]: "
gc;a=result;if a="N" then do;tr "No.";signal CHECKLHA;end;else tr "Yes!"
UPDATE1:
se "n1 Before we begin this update, I need to know WHERE you placed "
se "the 6.46(a) version of Wheel of Fortune. Please specify it's location "
tr "below: (Clear the text and press ENTER to Abort)n1"
se "Enter the path in which you stored Wheel of Fortune, v6.46(a) below:"
se "n1>L1305640#DOORS:}I16388 40}";gu 70;path=result
if path="" then do ; tr "Abort" ; signal QUIT ; end
if ~exists(path"WoFortune") | word(statef(path"WoFortune"),1)~="DIR" then do
se "n1 I'm sorry, but I could NOT locate the `"path"WoFortune/' "
tr "directory you specified above. Please check your typing."key
signal UPDATE1
end
if index(":/",right(path,1))=0 then path=path"/"
opath=path"WoFortune/"
if ~exists(opath"Config.Data") then do
se "n1 Hmmm, I can't seem to find the `"opath"Config.Data' file. Are "
tr "you SURE you're using Wheel of Fortune, v6.46(a) presently?"key
signal UPDATE1
end
call open(f1,opath"Config.Data","r");a=readln(f1);call close(f1)
if substr(word(a,2),2)<6.46 then do
se "n1 You are presently using The Wheel of Fortune, "word(a,2)", "
se "however you NEED to be using v6.46(or v6.46a) before you'll "
se "be able to update to The Wheel of Fortune, v6.50. You could also "
tr "opt to install for the first time. The choice is yours!";signal QUIT
end
tr "n1Present Wheel of Fortune Setup:n1"
asc=exists(opath"Game.ASC");ans=exists(opath"Game.ANS")
ibm=exists(opath"Game.IBM");reg=exists(opath"Reg.Key")
se " Installed Asc Version: "left(word("No Yes",asc+1),10)
tr "Installed Ans Version: "word("No Yes",ans+1)"n1"
se " Installed IBM Version: "left(word("No Yes",ibm+1),10)
tr "Installed Reg Version: "word("No Yes",reg+1)
if asc+ans+ibm<3 then do
se "n1 I notice you are not using ALL the modules currently. Do you "
se "wish to only update the modules you are currently using? [No]: "
gc;a=result;if a="Y" then do;tr "Yes!";update=1;end
else do;tr "No.";update=2;end
end
else update=1
se "n1 In order to be absolutely sure this update is successful, I'll "
se "rename your existing `"opath"' directory as `"strip(opath,'t','/')
se "646/'. In the event this update does NOT work for you, you'll be "
se "able to revert back to the earlier version until a fix can be found."
if exists(strip(opath,'t','/')"646") then
address command "rename "strip(opath,'t','/')"646 "strip(opath,'t','/')"646(old)"
address command "rename "strip(opath,'t','/')" "strip(opath,'t','/')"646"
se key"n1";call UNPACKWOF;opath=strip(opath,'t','/')"646/";signal UPDATE_ENTRY
UPDATE2:
se " Various internal directory changes have been made in this new "
se "version of Wheel of Fortune. A new `Texts/' directory now exists in "
se "the `"path"' directory that will house all the textual data files "
tr "used in the game. Copying over your current files now..."key
se "n1Bankers..."
if exists(opath"Bankers") then
tr "#4copy "opath"Bankers "path"Texts/Bankers}ok"
else tr "missing."
se "BMillionaires..."
if exists(opath"BMillionaires") then
tr "#4copy "opath"BMillionaires "path"Texts/BMillionaires}ok"
else tr "missing."
se "BWinner..."
if exists(opath"BWinner") then
tr "#4copy "opath"BWinner "path"Texts/BWinner}ok"
else tr "missing."
se "BWinners..."
if exists(opath"BWinners") then
tr "#4copy "opath"BWinners "path"Texts/BWinners}ok"
else tr "missing."
se "LastPlayer..."
if exists(opath"LastPlayer") then
tr "#4copy "opath"LastPlayer "path"Texts/LastPlayer}ok"
else tr "missing."
se "LastReset..."
if exists(opath"LastReset") then
tr "#4copy "opath"LastReset "path"Texts/LastReset}ok"
else tr "missing."
lv="ASC ANS IBM" ; lt="OLD NEW"
do i=1 to 3
do j=1 to 2
ln="Log."word(lt,j)"."word(lv,i) ; se ln"..."
if exists(opath||ln) then tr "#4copy "opath||ln" "path"Texts/"ln"}ok"
else tr "missing."
end j
end i
se "Millionaires..."
if exists(opath"Millionaires") then
tr "#4copy "opath"Millionaires "path"Texts/Millionaires}ok"
else tr "missing."
se "NewPuz..."
if exists(opath"NewPuz") then
tr "#4copy "opath"NewPuz "path"Texts/NewPuz}ok"
else tr "missing."
se "Stats..."
if exists(opath"Stats") then
tr "#4copy "opath"Stats "path"Texts/Stats}ok"
else tr "missing."
se "Winner..."
if exists(opath"Winner") then
tr "#4copy "opath"Winner "path"Texts/Winner}ok"
else tr "missing."
se "Winners..."
if exists(opath"Winners") then
tr "#4copy "opath"Winners "path"Texts/Winners}ok"
else tr "missing."
se "n1 The `GameData', `Players', and `Config.Data' files have all "
se "received additions in this version as well. Also, the `Config.Data' "
se "file has been renamed `!Settings' and sits in the `"path"' directory, "
se "instead of inside the `"path"Texts/' directory. Converting these "
tr "files now..."key
se "n1GameData..."
call open(f1,opath"GameData","r")
do i=1 to 7 ; gd.i=readln(f1) ; end i
call close(f1)
parse var gd.6 v1'|'v2'|'v3'|'j ; gd.6=v1'|N|nioo|'v2'|'v3'|x'
call open(f1,path"Texts/GameData","w")
do i=1 to 7 ; call writeln(f1,gd.i) ; end i
call close(f1)
tr "converted."
se "n1Players..."
call open(f1,opath"Players","r")
do i=1 until eof(f1) ; pl.i=readln(f1) ; end i ; tot=i-1
call close(f1)
call open(f1,path"Texts/Players","w")
do i=1 to tot
call writeln(f1,strip(pl.i,'t','x')"0|x")
end i
call close(f1)
tr "converted."
se "n1Config.Data..."
call open(f1,opath"Config.Data","r")
do i=1 to 13 ; cfg.i=readln(f1) ; end i
call close(f1)
cfg.1="; v6.50 February 10, 1997"
cfg.12=strip(cfg.12,'t','x')"3|1|3|x"
call open(f1,path"!Settings","w")
do i=1 to 13 ; call writeln(f1,cfg.i) ; end i
call close(f1)
tr "converted."
se "n1 Now comparing your original `PuzData' file to the one included "
tr "in this new version.n1"
call open(f1,opath"PuzData","r")
opuz=strip(readch(f1,5),'t','00'x)
call close(f1)
call open(f1,path"PuzData","r")
npuz=strip(readch(f1,5),'t','00'x)
call close(f1)
tr "Total puzzles in your original PuzData file: "opuz"n1"
tr "Total puzzles in v6.50's *NEW* PuzData file: "npuz
se "n1 Numerous duplicate puzzles were found in the initial release "
se "of the `PuzData' file, so if the NEW file contains FEWER puzzles "
se "than your original, this is the reason.n2Do you want to use the "
se "*NEW* version `PuzData' file? [Yes]: ";gc;a=result
if a="N" then do;tr "No."
se "n1Renaming the newer file to `PuzData"npuz"' now..."
address command "rename "path"PuzData "path"PuzData"npuz ; tr 'ok'
se "n1Copying your original `PuzData' file into place..."
address command "copy "opath"PuzData "path"PuzData" ; tr 'ok'
end ; else do ; tr "Yes!"
se "n1Copying your original `PuzData' file into the updated `"path"' "
se "directory, renaming it as `PuzData"opuz"'..."
address command "copy "opath"PuzData "path"PuzData"opuz ; tr 'ok'
end
call CLEANUP
se "n1 Your Wheel of Fortune, v6.46(a) has been successfully updated "
se "to the newer 6.50 version. You'll now want to read the updated "
se "`README.GUIDE' file to touch base on the newest enhancements and "
tr "changes that have been made."
if view=0 then do
se "n1 I could not locate either MultiView or AmigaGuide in your "
se "SYS:UTILITIES/ directory. Auto-viewing of the readme guide could "
se "not be performed. Please refer to the `README.GUIDE', which can be "
se "located in the `"path"Guides/' directory to find out what's new in "
se "The Wheel of Fortune, v6.50!" ; signal QUIT
end
if view=1 then tr "#4multiview "path"guides/README.guide pubscreen CNETSCREEN"port"}"
if view=2 then tr "#4amigaguide "path"guides/README.guide pubscreen CNETSCREEN"port"}"
tr "The Wheel of Fortune, v6.50 update script terminates now..."
signal QUIT
INSTALL:
se "n1 You have just selected to install The Wheel of Fortune, v6.50 "
se "for the first time. Is this correct? [Yes]: " ; update=0
gc;a=result;if a="N" then do;tr "No.";signal CHECKLHA;end;else tr "Yes!"
call UNPACKWOF
INSTALL1:
se " Alright, we now need to select a location somewhere on your "
se "system to store Wheel of Fortune's files. A `WoFortune' directory "
se "will be created in the path you specify below: (Clear the text and "
tr "press ENTER to Abort)n1"
se "Enter the path you'd like to install Wheel of Fortune, v6.50 into:"
se "n1>L1305640#DOORS:}I16388 40}";gu 70;path=result
if path="" then do ; tr "Abort" ; signal QUIT ; end
if ~exists(path) | word(statef(path),1)~="DIR" then do
se "I'm sorry, but either this is NOT a directory, or the directory you "
se "specified: `"path"' could not be located."key;signal INSTALL1
end
if index(word(statef(path),4),"W")=0 then do
se "n1The path you have selected: `"path"' is write protected, and "
tr "can NOT presently be used to install The Wheel of Fortune!"key
signal INSTALL1
end
if exists(path"WoFortune/") & word(statef(path"WoFortune"),1)="DIR" then do
se "n1There is already a `WoFortune/' directory located in `"path"'. "
se "Perhaps you meant to UPDATE, instead of installing for the first "
se "time. If you'd like, I can RENAME the existing directory, then "
se "continue the installation procedure. Rename and continue with the "
se "installation now? [Yes]: ";gc;a=result
if a="N" then do;tr "No, installation aborting.";signal QUIT;end
se "Yes, Renaming...";zz=rename(path"WoFortune",path"WoFortune(old)")
tr "h6ed!"
end
if exists(path"WoFortune") then do
se "n1There appears to be a FILE named `WoFortune' located in the path "
se "`"path"' you designated above. Rename and continue with the "
se "installation now? [Yes]: ";gc;a=result
if a="N" then do;tr "No, installation aborting.";signal QUIT;end
se "Yes, Renaming...";zz=rename(path"WoFortune",path"WoFortune(old)")
tr "h6ed!"
end
UPDATE_ENTRY:
se "n1Now creating `"path"WoFortune/'..."
do until zz=1;zz=makedir(path"WoFortune");end
tr word("Error OK",zz+1);path=path"WoFortune/"
se "n1Now creating `"path"Texts/'..."
do until zz=1;zz=makedir(path"Texts");end
tr word("Error OK",zz+1)
se "n1Now creating `"path"Graphics/'..."
do until zz=1;zz=makedir(path"Graphics");end
tr word("Error OK",zz+1)
tr "n1Please hold; unpacking `"df"support.lha'...n1"
tr "#4"lha" x -m "df"support.lha "path"}"
if update=1 then signal UPDATE_ENTRY2
tr "There are three versions of The Wheel of Fortune available:n1"
tr " Ascii - Uses NO COLOR and NO IBM 8-bit Graphics"
tr " Ansi - Uses 16 Colors, but NO IBM 8-bit Graphics"
tr "IBM-Ansi - Uses 16 Colors AND IBM 8-Bit Graphicsn1"
tr "You can choose to install one, two, or all three versions.n1"
se "Install the Ascii version? [Yes]: ";gc;a=result
if a="N" then do;tr "No";asc=0;end;else do;tr "Yes";asc=1;end
se "Install the Ansi version? [Yes]: ";gc;a=result
if a="N" then do;tr "No";ans=0;end;else do;tr "Yes";ans=1;end
se "Install the IBM-Ansi version? [Yes]: ";gc;a=result
if a="N" then do;tr "No";ibm=0;end;else do;tr "Yes";ibm=1;end
if asc+ans+ibm=0 then do
se "n1You chose NOT to install ANY of the modules. Would you like to "
se "abort the installation now, or install all three modules? (Press "
se "ENTER to Abort; any other key to fully install) [ABORT]: "
gc;a=result
if a~=d2c(13) then do;tr "Install";asc=1;ans=1;ibm=1;end
else do;tr "Abortn1"
tr "Please hold; cleaning up..."
if update=0 then se "#4delete "path"#? all}"
if update=0 then se "#4delete "left(path,length(path)-1)"}"
se "#4delete "df"docs.lha}"
se "#4delete "df"games.lha}"
se "#4delete "df"gra_ans.lha}"
se "#4delete "df"gra_asc.lha}"
se "#4delete "df"gra_ibm.lha}"
se "#4delete "df"support.lha}"
tr "Finished!";signal QUIT
end
end
UPDATE_ENTRY2: ; if update=2 then update=1
if asc then do ; tr "n1Installing the Ascii version:n1"
tr "#4"lha" x -m "df"games.lha Game.ASC "path"}"
tr "#4"lha" x -m "df"docs.lha Docs.ASC "path"Texts/}"
tr "#4"lha" x -m "df"gra_asc.lha "path"Graphics/}"
end
if ans then do ; tr "n1Installing the Ansi version:n1"
tr "#4"lha" x -m "df"games.lha Game.ANS "path"}"
tr "#4"lha" x -m "df"docs.lha Docs.ANS "path"Texts/}"
tr "#4"lha" x -m "df"gra_ans.lha "path"Graphics/}"
end
if ibm then do ; tr "n1Installing the IBM-Ansi version:n1"
tr "#4"lha" x -m "df"games.lha Game.IBM "path"}"
tr "#4"lha" x -m "df"docs.lha Docs.IBM "path"Texts/}"
tr "#4"lha" x -m "df"gra_ibm.lha "path"Graphics/}"
end
if update=1 then signal UPDATE2
call CLEANUP
se "n1 The Wheel of Fortune has many different sysop definable options "
se "which you may want to set at a later date, however the setup file "
tr "will now be run to insure a complete installation by this script."key
tr "n1Running the Wheel of Fortune SetUp file...#0"path"Setup}"
se "f1n3 The Wheel of Fortune, v6.50 has been successfully installed "
se "into your system. You'll now need to read the `README.GUIDE' to "
se "complete the installation by creating a CNet Event, adding and/or "
tr "modifying lines in BBSTEXT, and adding some commands to BBSMENU."
if view=0 then do
se "n1 I could not locate either MultiView or AmigaGuide in your "
se "SYS:UTILITIES/ directory. Auto-viewing of the readme guide could "
se "not be performed. Please refer to the `README.GUIDE', which can be "
se "located in the `"path"Guides/' directory to find out how to complete "
se "the Wheel of Fortune installation!" ; signal QUIT
end
if view=1 then tr "#4multiview "path"guides/README.guide pubscreen CNETSCREEN"port"}"
if view=2 then tr "#4amigaguide "path"guides/README.guide pubscreen CNETSCREEN"port"}"
tr "n1The Wheel of Fortune, v6.50 installation script terminates now..."
signal QUIT
UNPACKWOF:
tr "n1Please hold; unpacking `"df"wof.lha'...n1"
tr "#4"lha" x -m "df"wof.lha "df"}" ; return
QUIT: ; setobject oc ; putuser 2407202 ; exit
CLEANUP:
tr "n1Please hold; cleaning up..."
se "#4delete "df"docs.lha}#4delete "df"games.lha}"
se "#4delete "df"gra_ans.lha}#4delete "df"gra_asc.lha}"
se "#4delete "df"gra_ibm.lha}#4delete "df"support.lha}"
se "#4delete "df"wof.lha}#4delete "df"!Read_Me_First!}"
if df~="RAM:" then se "#4delete "df"InstallWOF}"
call setclip('installwof')
tr "Completed cleanup!"
return
SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
e2=" Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
bufferflush;signal QUIT
/**************************************************************************\
\****************************************** Frontiers BBS (716)/823-9892 **/